1. Create a disc model. Paint it white.

2. I'm using my handy-dandy fog wrappers, which are nice in general:


code:
--------------------------------------------------------------------------------

# Sets fog range (setting far==0 turns fog off):
function set_fog(near, far) 
{	
	if(far==0) 
	{		
		camera.fog=0;
		return;	
	}	
	fog_color=1;	
	camera.fog=1;	
	camera.fog_start=near;	
	camera.fog_end=far;
}
# Sets the fog color:

function set_fog_color(r, g, b) 	
{	
	fog_color=1;	
	d3d_fogcolor1.red=r;	
	d3d_fogcolor1.green=g;	
	d3d_fogcolor1.blue=b;
}

--------------------------------------------------------------------------------

3. Code the fog entity:


code:
--------------------------------------------------------------------------------

action entity_fog1 
{	
	my.passable=1;	

# Self-illuminate:	
	my.light=1;	
	my.red=255;	
	my.green=255;	
	my.blue=255;	

# Transparent fog:	
	my.alpha=20;	
	my.transparent=1;	

# Follow player around:	
	while(1) 
	{		
		if(player) 
		{			
			vec_set(my.x, player.x);
		}		
	wait(1);	
	}
}

--------------------------------------------------------------------------------

4. Spawn multiple instances of the fog object close to the ground -- put this right after you load your level:


code:
--------------------------------------------------------------------------------

# Set A6 fog info:

set_fog(1000,2000);
set_fog_color(255,255,255);

# Spawn a layer every 5 quants, from 5 to 100:

temp=0;
while(temp<100) 
{	
	temp+=5;	
	ent_create("..\\models\\disc.mdl", vector(0,0,temp), entity_fog1);
}

--------------------------------------------------------------------------------

That dragged the framerate down from about 70FPS to 60 on my system.


///////////////////////////////////////////////////////////////////////////////

Actually, I missed a 'temp=0', so that might cause a problem:


code:
--------------------------------------------------------------------------------

 # Set A6 fog info:
set_fog(1000,2000);
set_fog_color(255,255,255);
temp=0;

# Spawn a layer every 5 quants, from 5 to 100:

while(temp<100) 
{	   
	temp+=5;	   
	ent_create("..\\models\\disc.mdl", vector(0,0,temp), entity_fog1);
}

--------------------------------------------------------------------------------

Also, you probably don't need 20 of 'em. Perhaps instead of 'temp+=5', you could do a 'temp+=10'? I dunno. Like I said, it was quick, one-off.  





///////////////////////////////////////////////////////////////////////////////////////
How to turn on fog  basics...

fog_color = 1; // Fog Colours 1
camera.fog = 1; // Your fog set the number you want is how thick the fog will be.
fog_color = 2; // Fog Colours 2
camera.fog = 1; // Your fog set the number you want is how thick the fog will be.
fog_color = 3; // Fog Colours 3
camera.fog = 1; // Your fog set the number you want is how thick the fog will be.
fog_color = 4; // Fog Colours 4
camera.fog = 1; // Your fog set the number you want is how thick the fog will be.

--------------------------------------------------------------------------------

must use view.start and stop now in place of view.fog ( no longer used in 6.11)

camera.fog_start = 0.8 * clip_range; // fog at 80% of clip_range
camera.fog_end = 0.9 * clip_range; // fog till 90% of clip_range



